#include "SDL_mixer.h"
#include "plsdlmixerlua.h"
#include "../core/LuaUtils.h"
#include "PlSDLMixer.h"

void PlSDLMixerLua::pushStaticFuncs(lua_State* L)
{
	static const struct luaL_Reg mylib [] = {
		{"AllocateChannels", li_Mix_AllocateChannels},
		{"SetPanning", li_Mix_SetPanning},
		{"SetPosition", li_Mix_SetPosition},
		{"SetDistance", li_Mix_SetDistance},
		{"SetReverseStereo", li_Mix_SetReverseStereo},
		{"ReserveChannels", li_Mix_ReserveChannels},
		{"GroupChannel", li_Mix_GroupChannel},
		{"GroupChannels", li_Mix_GroupChannels},
		{"GroupAvailable", li_Mix_GroupAvailable},
		{"GroupCount", li_Mix_GroupCount},
		{"GroupOldest", li_Mix_GroupOldest},
		{"GroupNewer", li_Mix_GroupNewer},
		{"PlayChannel", li_Mix_PlayChannel},
		{"PlayChannelTimed", li_Mix_PlayChannelTimed},
		{"PlayMusic", li_Mix_PlayMusic},
		{"FadeInMusic", li_Mix_FadeInMusic},
		{"FadeInMusicPos", li_Mix_FadeInMusicPos},
		{"FadeInChannel", li_Mix_FadeInChannel},
		{"FadeInChannelTimed", li_Mix_FadeInChannelTimed},
		{"Volume", li_Mix_Volume},
		{"VolumeChunk", li_Mix_VolumeChunk},
		{"VolumeMusic", li_Mix_VolumeMusic},
		{"HaltChannel", li_Mix_HaltChannel},
		{"HaltGroup", li_Mix_HaltGroup},
		{"HaltMusic", li_Mix_HaltMusic},
		{"ExpireChannel", li_Mix_ExpireChannel},
		{"FadeOutChannel", li_Mix_FadeOutChannel},
		{"FadeOutGroup", li_Mix_FadeOutGroup},
		{"FadeOutMusic", li_Mix_FadeOutMusic},
		{"Pause", li_Mix_Pause},
		{"Resume", li_Mix_Resume},
		{"Paused", li_Mix_Paused},
		{"PauseMusic", li_Mix_PauseMusic},
		{"ResumeMusic", li_Mix_ResumeMusic},
		{"RewindMusic", li_Mix_RewindMusic},
		{"PausedMusic", li_Mix_PausedMusic},
		{"SetMusicPosition", li_Mix_SetMusicPosition},
		{"Playing", li_Mix_Playing},
		{"PlayingMusic", li_Mix_PlayingMusic},
		{"SetSynchroValue", li_Mix_SetSynchroValue},
		{"GetSynchroValue", li_Mix_GetSynchroValue},
		{NULL, NULL}  /* sentinel */
	};

	// dump them into said table
	luaL_register(L, NULL, mylib);
}

int PlSDLMixerLua::li_Mix_AllocateChannels(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_AllocateChannels(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FreeChunk(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int tempArg1 = (int)lua_tonumber(L, 2); Mix_Chunk* a1 = op->getChunk(tempArg1); if(a1 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	/*v*/Mix_FreeChunk(a1);
	
	return 0;
}


int PlSDLMixerLua::li_Mix_FreeMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int tempArg1 = (int)lua_tonumber(L, 2); Mix_Music* a1 = op->getMusic(tempArg1); if(a1 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	/*v*/Mix_FreeMusic(a1);
	
	return 0;
}


int PlSDLMixerLua::li_Mix_SetPanning(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int a3 = (int)lua_tointeger(L, 4);
	int ret = /*v*/Mix_SetPanning(a1, a2, a3);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_SetPosition(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int a3 = (int)lua_tointeger(L, 4);
	int ret = /*v*/Mix_SetPosition(a1, a2, a3);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_SetDistance(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_SetDistance(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_SetReverseStereo(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_SetReverseStereo(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_ReserveChannels(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_ReserveChannels(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GroupChannel(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_GroupChannel(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GroupChannels(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int a3 = (int)lua_tointeger(L, 4);
	int ret = /*v*/Mix_GroupChannels(a1, a2, a3);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GroupAvailable(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_GroupAvailable(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GroupCount(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_GroupCount(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GroupOldest(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_GroupOldest(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GroupNewer(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_GroupNewer(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_PlayChannel(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int tempArg2 = (int)lua_tonumber(L, 3); Mix_Chunk* a2 = op->getChunk(tempArg2); if(a2 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a3 = (int)lua_tointeger(L, 4);
	int ret = /*v*/Mix_PlayChannel(a1, a2, a3);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_PlayChannelTimed(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int tempArg2 = (int)lua_tonumber(L, 3); Mix_Chunk* a2 = op->getChunk(tempArg2); if(a2 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a3 = (int)lua_tointeger(L, 4);
	int a4 = (int)lua_tointeger(L, 5);
	int ret = /*v*/Mix_PlayChannelTimed(a1, a2, a3, a4);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_PlayMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int tempArg1 = (int)lua_tonumber(L, 2); Mix_Music* a1 = op->getMusic(tempArg1); if(a1 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_PlayMusic(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeInMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int tempArg1 = (int)lua_tonumber(L, 2); Mix_Music* a1 = op->getMusic(tempArg1); if(a1 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a2 = (int)lua_tointeger(L, 3);
	int a3 = (int)lua_tointeger(L, 4);
	int ret = /*v*/Mix_FadeInMusic(a1, a2, a3);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeInMusicPos(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int tempArg1 = (int)lua_tonumber(L, 2); Mix_Music* a1 = op->getMusic(tempArg1); if(a1 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a2 = (int)lua_tointeger(L, 3);
	int a3 = (int)lua_tointeger(L, 4);
	double a4 = (double)lua_tonumber(L, 5);
	int ret = /*v*/Mix_FadeInMusicPos(a1, a2, a3, a4);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeInChannel(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int tempArg2 = (int)lua_tonumber(L, 3); Mix_Chunk* a2 = op->getChunk(tempArg2); if(a2 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a3 = (int)lua_tointeger(L, 4);
	int a4 = (int)lua_tointeger(L, 5);
	int ret = /*v*/Mix_FadeInChannel(a1, a2, a3, a4);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeInChannelTimed(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int tempArg2 = (int)lua_tonumber(L, 3); Mix_Chunk* a2 = op->getChunk(tempArg2); if(a2 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a3 = (int)lua_tointeger(L, 4);
	int a4 = (int)lua_tointeger(L, 5);
	int a5 = (int)lua_tointeger(L, 6);
	int ret = /*v*/Mix_FadeInChannelTimed(a1, a2, a3, a4, a5);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_Volume(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_Volume(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_VolumeChunk(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int tempArg1 = (int)lua_tonumber(L, 2); Mix_Chunk* a1 = op->getChunk(tempArg1); if(a1 == NULL){ LOG(logERROR) << "Null input."; return 0; }
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_VolumeChunk(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_VolumeMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_VolumeMusic(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_HaltChannel(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_HaltChannel(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_HaltGroup(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_HaltGroup(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_HaltMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int ret = /*v*/Mix_HaltMusic();
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_ExpireChannel(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_ExpireChannel(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeOutChannel(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_FadeOutChannel(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeOutGroup(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int a2 = (int)lua_tointeger(L, 3);
	int ret = /*v*/Mix_FadeOutGroup(a1, a2);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_FadeOutMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_FadeOutMusic(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_Pause(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	/*v*/Mix_Pause(a1);
	
	return 0;
}


int PlSDLMixerLua::li_Mix_Resume(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	/*v*/Mix_Resume(a1);
	
	return 0;
}


int PlSDLMixerLua::li_Mix_Paused(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_Paused(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_PauseMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	/*v*/Mix_PauseMusic();
	
	return 0;
}


int PlSDLMixerLua::li_Mix_ResumeMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	/*v*/Mix_ResumeMusic();
	
	return 0;
}


int PlSDLMixerLua::li_Mix_RewindMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	/*v*/Mix_RewindMusic();
	
	return 0;
}


int PlSDLMixerLua::li_Mix_PausedMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int ret = /*v*/Mix_PausedMusic();
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_SetMusicPosition(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	double a1 = (double)lua_tonumber(L, 2);
	int ret = /*v*/Mix_SetMusicPosition(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_Playing(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_Playing(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_PlayingMusic(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int ret = /*v*/Mix_PlayingMusic();
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_SetSynchroValue(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int a1 = (int)lua_tointeger(L, 2);
	int ret = /*v*/Mix_SetSynchroValue(a1);
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_GetSynchroValue(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	int ret = /*v*/Mix_GetSynchroValue();
	lua_pushinteger(L, ret);
	return 1;
}


int PlSDLMixerLua::li_Mix_CloseAudio(lua_State* L)
{
	PlSDLMixer* op = (PlSDLMixer*)typeCheckUnboxAO(L,1,"PlSDLMixer");
	if(op == NULL){
		LOG(logERROR) << "Null self!";
	return 0;}
	/*v*/Mix_CloseAudio();
	
	return 0;
}


